<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue'
import { Edit, Timer, Star, Trophy, Picture, MagicStick } from '@element-plus/icons-vue'

// 粒子动画相关
interface Particle {
  x: number
  y: number
  radius: number
  color: string
  vx: number
  vy: number
  sinOffset: number
}

const canvasRef = ref<HTMLCanvasElement | null>(null)
let animationFrame: number | null = null
let particles: Particle[] = []

// 创建粒子
const createParticles = () => {
  const canvas = canvasRef.value
  if (!canvas) return

  const ctx = canvas.getContext('2d')
  if (!ctx) return

  const dpr = window.devicePixelRatio || 1

  // 设置canvas尺寸
  const updateCanvasSize = () => {
    if (!canvas) return
    canvas.width = window.innerWidth * dpr
    canvas.height = window.innerHeight * dpr
    ctx.scale(dpr, dpr)
  }

  updateCanvasSize()
  window.addEventListener('resize', updateCanvasSize)

  // 创建粒子
  const particleCount = 80 // 减少粒子数量，提高性能
  particles = []

  for (let i = 0; i < particleCount; i++) {
    particles.push({
      x: Math.random() * window.innerWidth,
      y: Math.random() * window.innerHeight,
      radius: Math.random() * 1.5 + 0.5, // 调整粒子大小
      color: `hsla(${Math.random() * 40 + 200}, 100%, 75%, ${Math.random() * 0.4 + 0.2})`, // 更协调的蓝色调
      vx: Math.random() * 0.3 - 0.15, // 减慢移动速度
      vy: Math.random() * 0.3 - 0.15,
      sinOffset: Math.random() * Math.PI * 2
    })
  }

  // 动画循环
  const animate = () => {
    if (!canvas || !ctx) return
    ctx.clearRect(0, 0, canvas.width / dpr, canvas.height / dpr)

    // 绘制粒子
    particles.forEach(particle => {
      particle.x += particle.vx
      particle.y += particle.vy
      particle.sinOffset += 0.008 // 减慢脉动速度

      // 边界检查
      if (particle.x < 0) particle.x = window.innerWidth
      if (particle.x > window.innerWidth) particle.x = 0
      if (particle.y < 0) particle.y = window.innerHeight
      if (particle.y > window.innerHeight) particle.y = 0

      // 绘制粒子
      ctx.beginPath()
      ctx.arc(
        particle.x,
        particle.y,
        particle.radius * (1 + 0.15 * Math.sin(particle.sinOffset)), // 减小脉动幅度
        0,
        Math.PI * 2
      )
      ctx.fillStyle = particle.color
      ctx.fill()
    })

    // 绘制连线
    ctx.strokeStyle = 'rgba(120, 220, 255, 0.05)' // 降低连线不透明度
    ctx.lineWidth = 0.3 // 更细的连线

    for (let i = 0; i < particles.length; i++) {
      for (let j = i + 1; j < particles.length; j++) {
        const dx = particles[i].x - particles[j].x
        const dy = particles[i].y - particles[j].y
        const distance = Math.sqrt(dx * dx + dy * dy)

        if (distance < 120) { // 增加连线距离
          ctx.beginPath()
          ctx.moveTo(particles[i].x, particles[i].y)
          ctx.lineTo(particles[j].x, particles[j].y)
          // 根据距离设置透明度
          const opacity = 1 - distance / 120
          ctx.strokeStyle = `rgba(120, 220, 255, ${opacity * 0.05})`
          ctx.stroke()
        }
      }
    }

    animationFrame = requestAnimationFrame(animate)
  }

  animate()
}

// 生命周期钩子
onMounted(() => {
  createParticles()
})

onUnmounted(() => {
  if (animationFrame) {
    cancelAnimationFrame(animationFrame)
  }
  window.removeEventListener('resize', () => {})
})
</script>

<template>
  <div class="home">
    <canvas ref="canvasRef" class="particle-canvas"></canvas>

    <div class="artistic-elements">
      <div class="circle circle-1"></div>
      <div class="circle circle-2"></div>
      <div class="circle circle-3"></div>
      <div class="line line-1"></div>
      <div class="line line-2"></div>
    </div>

    <div class="content">
      <div class="title-container">
        <h1 class="title" data-text="未来日记">未来日记</h1>
        <div class="title-decoration">
          <span></span><span></span><span></span>
        </div>
        <p class="subtitle">在这里记录你的未来，创造无限可能</p>
      </div>

      <div class="features">
        <div class="feature-card" v-for="(feature, index) in [
          { icon: Edit, title: '记录未来', desc: '写下你对未来的期待和计划，让梦想有迹可循' },
          { icon: Timer, title: '时间线', desc: '在时间长河中留下你的印记，见证成长的每一步' },
          { icon: Star, title: '目标星系', desc: '设定并追踪你的目标，让每一个梦想都有实现的可能' },
          { icon: Trophy, title: '成就系统', desc: '解锁你的未来成就，记录每一个值得纪念的时刻' },
          { icon: Picture, title: '艺术画廊', desc: '用图像记录美好，让回忆更加生动鲜活' },
          { icon: MagicStick, title: '创意空间', desc: '释放你的想象力，创造属于你的独特世界' }
        ]" :key="index" :style="{ animationDelay: `${index * 0.1}s` }">
          <div class="card-icon">
            <el-icon><component :is="feature.icon" /></el-icon>
          </div>
          <div class="card-content">
            <h3>{{ feature.title }}</h3>
            <p>{{ feature.desc }}</p>
          </div>
        </div>
      </div>

      <div class="inspiration-quote">
        <blockquote>
          "未来不是我们要去的地方，而是我们正在创造的地方。道路不是被发现的，而是在我们行走时形成的。"
        </blockquote>
        <cite>— 未来日记</cite>
      </div>
    </div>
  </div>
</template>

<style scoped>
.home {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(70deg, var(--bg-primary), rgb(135, 147, 166));
}

/* 针对明亮主题优化背景 */
:root[data-theme="dawn-light"] .home,
:root[data-theme="mint-morning"] .home {
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.artistic-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.circle-1 {
  width: 40vw;
  height: 40vw;
  border: 2px solid var(--laser-cyan);
  top: -10vw;
  right: -10vw;
  animation: float 25s infinite ease-in-out;
}

.circle-2 {
  width: 25vw;
  height: 25vw;
  border: 2px solid var(--hologram-purple);
  bottom: -5vw;
  left: -5vw;
  animation: float 20s infinite ease-in-out reverse;
}

.circle-3 {
  width: 15vw;
  height: 15vw;
  border: 2px solid var(--supernova-orange);
  top: 30%;
  left: 10%;
  animation: pulse 15s infinite ease-in-out;
}

.line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--laser-cyan), transparent);
  height: 1px;
  width: 100%;
  opacity: 0.15;
}

.line-1 {
  top: 30%;
  animation: scan 20s infinite linear;
}

.line-2 {
  bottom: 40%;
  animation: scan 25s infinite linear reverse;
}

.content {
  position: relative;
  z-index: 10;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-primary);
  max-width: 1200px;
  margin: 0 auto;
}

.title-container {
  margin-bottom: 5rem;
  position: relative;
}

.title {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--laser-cyan), var(--hologram-purple), var(--supernova-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(var(--laser-cyan-rgb), 0.3);
  font-weight: 900;
  letter-spacing: 4px;
  position: relative;
  display: inline-block;
}

/* 增强简约主题和水墨主题下的文字显示 */
:root[data-theme="minimal"] .title,
:root[data-theme="ink"] .title {
  background: var(--text-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(var(--text-primary-rgb), 0.5);
}

/* 增强明亮主题下的标题对比度 */
:root[data-theme="dawn-light"] .title,
:root[data-theme="mint-morning"] .title {
  text-shadow: 0 0 20px rgba(var(--laser-cyan-rgb), 0.5);
  font-weight: 800;
}

.title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--laser-cyan), var(--hologram-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.4;
  filter: blur(8px);
  animation: pulse 5s infinite alternate;
}

/* 增强简约主题和水墨主题下的文字显示 */
:root[data-theme="minimal"] .title::after,
:root[data-theme="ink"] .title::after {
  background: var(--text-primary);
  opacity: 0.3;
}

.title-decoration {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
}

.title-decoration span {
  display: block;
  height: 3px;
  width: 30px;
  background: var(--laser-cyan);
  border-radius: 3px;
  opacity: 0.8;
}

.title-decoration span:nth-child(2) {
  width: 60px;
  background: var(--hologram-purple);
}

.title-decoration span:nth-child(3) {
  background: var(--supernova-orange);
}

/* 增强简约主题和水墨主题下的装饰线显示 */
:root[data-theme="minimal"] .title-decoration span,
:root[data-theme="ink"] .title-decoration span {
  background: var(--text-primary);
  opacity: 0.7;
}

:root[data-theme="minimal"] .title-decoration span:nth-child(2),
:root[data-theme="ink"] .title-decoration span:nth-child(2) {
  background: var(--text-primary);
  opacity: 0.9;
}

:root[data-theme="minimal"] .title-decoration span:nth-child(3),
:root[data-theme="ink"] .title-decoration span:nth-child(3) {
  background: var(--text-primary);
  opacity: 0.5;
}

.subtitle {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: 1px;
  max-width: 600px;
  margin: 0 auto;
}

/* 增强简约主题和水墨主题下的副标题显示 */
:root[data-theme="minimal"] .subtitle,
:root[data-theme="ink"] .subtitle {
  color: var(--text-primary);
  opacity: 0.8;
  font-weight: 400;
}

/* 增强明亮主题下的副标题对比度 */
:root[data-theme="dawn-light"] .subtitle,
:root[data-theme="mint-morning"] .subtitle {
  color: var(--text-primary);
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 增强暗色主题下的副标题可见性 */
:root[data-theme="dark-matter"] .subtitle,
:root[data-theme="quantum-space"] .subtitle,
:root[data-theme="laser-neon"] .subtitle,
:root[data-theme="hologram-purple"] .subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0;
}

.feature-card {
  background: rgba(var(--bg-card-rgb), 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--border-color-rgb), 0.2);
  border-radius: 1.2rem;
  padding: 2.5rem 2rem;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out both;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 增强暗色主题下卡片边缘的可视性 */
:root[data-theme="dark-matter"] .feature-card,
:root[data-theme="quantum-space"] .feature-card,
:root[data-theme="laser-neon"] .feature-card,
:root[data-theme="hologram-purple"] .feature-card {
  border: 1px solid rgba(var(--border-color-rgb), 0.5);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(var(--border-color-rgb), 0.4);
  background: rgba(var(--bg-card-rgb), 0.3);
}

/* 增强明亮主题下卡片的可视性 */
:root[data-theme="dawn-light"] .feature-card,
:root[data-theme="mint-morning"] .feature-card {
  background: rgba(var(--bg-card-rgb), 0.8);
  border: 1px solid rgba(var(--border-color-rgb), 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(var(--laser-cyan-rgb), 0.03), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s ease-in-out;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(var(--laser-cyan-rgb), 0.2);
  border-color: rgba(var(--laser-cyan-rgb), 0.5);
  background: rgba(var(--bg-card-rgb), 0.25);
}

/* 增强暗色主题下卡片悬停效果 */
:root[data-theme="dark-matter"] .feature-card:hover,
:root[data-theme="quantum-space"] .feature-card:hover,
:root[data-theme="laser-neon"] .feature-card:hover,
:root[data-theme="hologram-purple"] .feature-card:hover {
  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(var(--laser-cyan-rgb), 0.4),
    0 0 0 1px rgba(var(--laser-cyan-rgb), 0.6);
  border-color: rgba(var(--laser-cyan-rgb), 0.8);
  background: rgba(var(--bg-card-rgb), 0.4);
}

/* 增强明亮主题下卡片悬停效果 */
:root[data-theme="dawn-light"] .feature-card:hover,
:root[data-theme="mint-morning"] .feature-card:hover {
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.1),
    0 0 15px rgba(var(--laser-cyan-rgb), 0.3);
  border-color: rgba(var(--laser-cyan-rgb), 0.7);
  background: rgba(var(--bg-card-rgb), 0.9);
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(var(--bg-secondary-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
  position: relative;
  transition: all 0.5s ease;
  border: 1px solid rgba(var(--border-color-rgb), 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 增强暗色主题下图标容器的可视性 */
:root[data-theme="dark-matter"] .card-icon,
:root[data-theme="quantum-space"] .card-icon,
:root[data-theme="laser-neon"] .card-icon,
:root[data-theme="hologram-purple"] .card-icon {
  border: 1px solid rgba(var(--border-color-rgb), 0.6);
  background: rgba(var(--bg-secondary-rgb), 0.4);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 增强明亮主题下图标容器的可视性 */
:root[data-theme="dawn-light"] .card-icon,
:root[data-theme="mint-morning"] .card-icon {
  background: rgba(var(--bg-secondary-rgb), 0.5);
  border: 1px solid rgba(var(--border-color-rgb), 0.4);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.card-icon::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--laser-cyan), var(--hologram-purple)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature-card:hover .card-icon::after {
  opacity: 1;
}

.feature-card:hover .card-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(var(--laser-cyan-rgb), 0.3);
}

.card-icon .el-icon {
  font-size: 2.5rem;
  color: var(--laser-cyan);
  filter: drop-shadow(0 0 8px rgba(var(--laser-cyan-rgb), 0.4));
  transition: all 0.5s ease;
}

/* 增强简约主题和水墨主题下的图标显示 */
:root[data-theme="minimal"] .card-icon .el-icon,
:root[data-theme="ink"] .card-icon .el-icon {
  color: var(--text-primary);
  filter: drop-shadow(0 0 5px rgba(var(--text-primary-rgb), 0.3));
}

/* 增强明亮主题下的图标显示 */
:root[data-theme="dawn-light"] .card-icon .el-icon,
:root[data-theme="mint-morning"] .card-icon .el-icon {
  color: var(--laser-cyan);
  filter: drop-shadow(0 0 8px rgba(var(--laser-cyan-rgb), 0.5));
}

.feature-card:hover .card-icon .el-icon {
  transform: scale(1.1);
  color: var(--hologram-purple);
  filter: drop-shadow(0 0 12px rgba(var(--hologram-purple-rgb), 0.5));
}

/* 增强简约主题和水墨主题下的图标悬停效果 */
:root[data-theme="minimal"] .feature-card:hover .card-icon .el-icon,
:root[data-theme="ink"] .feature-card:hover .card-icon .el-icon {
  color: var(--text-primary);
  filter: drop-shadow(0 0 8px rgba(var(--text-primary-rgb), 0.5));
}

.card-content {
  text-align: center;
}

.feature-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: all 0.5s ease;
}

/* 增强暗色主题下标题的可见性 */
:root[data-theme="dark-matter"] .feature-card h3,
:root[data-theme="quantum-space"] .feature-card h3,
:root[data-theme="laser-neon"] .feature-card h3,
:root[data-theme="hologram-purple"] .feature-card h3 {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.feature-card:hover h3 {
  color: var(--laser-cyan);
  text-shadow: 0 0 8px rgba(var(--laser-cyan-rgb), 0.3);
}

/* 增强简约主题和水墨主题下的标题悬停效果 */
:root[data-theme="minimal"] .feature-card:hover h3,
:root[data-theme="ink"] .feature-card:hover h3 {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(var(--text-primary-rgb), 0.4);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.05rem;
}

/* 增强简约主题和水墨主题下的段落文字显示 */
:root[data-theme="minimal"] .feature-card p,
:root[data-theme="ink"] .feature-card p {
  color: var(--text-primary);
  opacity: 0.75;
}

/* 增强暗色主题下段落文字的可见性 */
:root[data-theme="dark-matter"] .feature-card p,
:root[data-theme="quantum-space"] .feature-card p,
:root[data-theme="laser-neon"] .feature-card p,
:root[data-theme="hologram-purple"] .feature-card p {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 增强明亮主题下段落文字的可见性 */
:root[data-theme="dawn-light"] .feature-card p,
:root[data-theme="mint-morning"] .feature-card p {
  color: var(--text-primary);
  opacity: 0.85;
  font-weight: 400;
}

.inspiration-quote {
  margin-top: 5rem;
  padding: 3rem 2rem;
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 1s ease-out 0.5s both;
}

.inspiration-quote blockquote {
  font-size: 1.6rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  position: relative;
  margin: 0;
  padding: 0 2.5rem;
}

/* 增强暗色主题下引用文字的可见性 */
:root[data-theme="dark-matter"] .inspiration-quote blockquote,
:root[data-theme="quantum-space"] .inspiration-quote blockquote,
:root[data-theme="laser-neon"] .inspiration-quote blockquote,
:root[data-theme="hologram-purple"] .inspiration-quote blockquote {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.inspiration-quote blockquote::before,
.inspiration-quote blockquote::after {
  content: '"';
  font-size: 4rem;
  color: var(--laser-cyan);
  opacity: 0.2;
  position: absolute;
  line-height: 1;
}

/* 增强简约主题和水墨主题下的引号显示 */
:root[data-theme="minimal"] .inspiration-quote blockquote::before,
:root[data-theme="minimal"] .inspiration-quote blockquote::after,
:root[data-theme="ink"] .inspiration-quote blockquote::before,
:root[data-theme="ink"] .inspiration-quote blockquote::after {
  color: var(--text-primary);
  opacity: 0.3;
}

.inspiration-quote blockquote::before {
  top: -1rem;
  left: 0;
}

.inspiration-quote blockquote::after {
  bottom: -2rem;
  right: 0;
}

.inspiration-quote cite {
  display: block;
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--hologram-purple);
  font-style: normal;
  text-align: right;
  opacity: 0.8;
}

/* 增强简约主题和水墨主题下的引用来源显示 */
:root[data-theme="minimal"] .inspiration-quote cite,
:root[data-theme="ink"] .inspiration-quote cite {
  color: var(--text-primary);
  opacity: 0.7;
}

/* 增强暗色主题下引用来源的可见性 */
:root[data-theme="dark-matter"] .inspiration-quote cite,
:root[data-theme="quantum-space"] .inspiration-quote cite,
:root[data-theme="laser-neon"] .inspiration-quote cite,
:root[data-theme="hologram-purple"] .inspiration-quote cite {
  color: var(--hologram-purple);
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 增强明亮主题下引用来源的可见性 */
:root[data-theme="dawn-light"] .inspiration-quote cite,
:root[data-theme="mint-morning"] .inspiration-quote cite {
  color: var(--hologram-purple);
  opacity: 0.9;
  font-weight: 500;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(1.5%, 1.5%) rotate(3deg);
  }
  50% {
    transform: translate(0, 3%) rotate(0deg);
  }
  75% {
    transform: translate(-1.5%, 1.5%) rotate(-3deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.03);
  }
}

@keyframes scan {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(70vh);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 3rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 1rem 0;
    gap: 2rem;
  }

  .inspiration-quote blockquote {
    font-size: 1.3rem;
    padding: 0 1.5rem;
  }

  .inspiration-quote cite {
    font-size: 1.1rem;
  }

  .circle-1 {
    width: 70vw;
    height: 70vw;
  }

  .circle-2 {
    width: 50vw;
    height: 50vw;
  }

  .circle-3 {
    width: 30vw;
    height: 30vw;
  }

  .feature-card h3 {
    font-size: 1.5rem;
  }

  .feature-card p {
    font-size: 1rem;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: more) {
  .feature-card {
    border-width: 2px;
  }

  .feature-card h3 {
    text-shadow: none;
  }

  .feature-card p {
    color: var(--text-primary);
    opacity: 0.9;
  }

  .subtitle {
    color: var(--text-primary);
    opacity: 0.95;
  }

  .card-icon {
    border-width: 2px;
  }
}
</style>
